#ifndef THREADPOOL_H
#define THREADPOOL_H

#include "mythread.h"
#include <QObject>
#include <memory>

class ThreadPool : public QObject {
  Q_OBJECT
public:
  explicit ThreadPool(QObject *parent = nullptr);

  MyThread *getThread() const;
  bool reduceThread(MyThread *target);

signals:

public slots:

private:
  const size_t MAX_THREAD_NUM = 10;
  std::vector<MyThread *> _threads;
};

#endif // THREADPOOL_H
